package com.xnck.example.jertest.controller;

import com.xnck.example.jertest.util.ResponseUtil;
import org.apache.log4j.Logger;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;


@Controller
@RequestMapping("root")
public class RootController {

    public final static Logger log = Logger.getLogger(RootController.class);

    @ResponseBody
    @RequestMapping(value = "default", method = RequestMethod.GET)
    public void getDefault(){
        try {
            ResponseUtil.responseSuccessMsg(null, "我是默认的信息");
        } catch (Exception e) {
            log.error(e);
        }
    }

    @RequestMapping(value = "forwarddft", method = RequestMethod.GET)
    public String forwardDefault() {
        return "forward:default.page";
    }
}
